from django.db import models

# Create your models here.
class TeachPaper(models.Model):
    Pno = models.IntegerField(db_column="Pno",primary_key=True,null=False,help_text="题目编号")#题目编号
    pType = models.CharField(db_column="pType",max_length=100,null=False,help_text="题目类型")#题目类型
    courseName = models.CharField(db_column="courseName", max_length=30, null=True, help_text="科目")  # 科目
    pDescribe = models.TextField(db_column="pDescribe",max_length=3000,null=False,help_text="题目描述")#题目描述
    answer1 = models.TextField(db_column="answer1",max_length=1000,null=True,help_text="选项1或者问题1答案")#选项1或者问题1答案
    answer2 = models.TextField(db_column="answer2", max_length=1000, null=True,help_text="选项1或者问题1答案")  # 选项1或者问题1答案
    answer3 = models.TextField(db_column="answer3", max_length=1000, null=True,help_text="选项1或者问题1答案")  # 选项1或者问题1答案
    answer4 = models.TextField(db_column="answer4", max_length=1000, null=True,help_text="选项1或者问题1答案")  # 选项1或者问题1答案
    answer5 = models.TextField(db_column="answer5", null=True,help_text="选项1或者问题1答案")  # 选项1或者问题1答案
    Correct = models.TextField(db_column="Correct", max_length=1000, null=True,help_text="题目答案")  # 题目答案
    trueParper = models.CharField(db_column="trueParper", max_length=30, null=True, help_text="原试卷名称")  # 原试卷名称
    KnowPoint1=models.CharField(db_column="KnowPoint1",max_length=100,null=True)
    KnowPoint2=models.CharField(db_column="KnowPoint2",max_length=100,null=True)
    mark=models.CharField(db_column="mark",max_length=1000,null=True)
    image = models.TextField(db_column="Image", max_length=320, null=True)




    class Meta:
        managed = True
        db_table = "TeachPaper"



class ParperConfig(models.Model):
    CFNo = models.IntegerField(db_column="CFNo",primary_key=True,null=False,help_text="配置编号")#配置编号
    cfName = models.CharField(db_column="cfName",max_length=100,null=True,help_text="配置名称")#配置名称
    cfDescribe = models.CharField(db_column="cfDescribe",max_length=1000,null=True,help_text="配置描述")#配置描述
    multipleChoice = models.CharField(db_column="multipleChoice",max_length=20,null=True,help_text="多选题")#多选题
    singleChoice=models.CharField(db_column="singleChioce",max_length=20,null=True,help_text="单项选择题")#单项选择题
    blankFilling = models.CharField(db_column="blankfilling",max_length=20,null=True,help_text="填空题")#填空题
    judgeQ = models.CharField(db_column="judgeQ",max_length=20,null=True,help_text="判断题")#判断题
    shortAnswer = models.CharField(db_column="shortAnswer",max_length=20,null=True,help_text="简答题")#简答题
    composition = models.IntegerField(db_column="composition",null=True,help_text="作文")#作文

    class Meta:
        managed=True
        db_table="ParperConfig"


class assortQuestion(models.Model):
    aId=models.IntegerField(db_column="aId",primary_key=True,null=False,help_text="配置编号")#配置编号
    courseName=models.CharField(db_column="courseName", max_length=30, null=True, help_text="科目")  # 科目
    KnowPoint1 = models.CharField(db_column="KnowPoint1", max_length=100, null=True)
    KnowPoint2 = models.CharField(db_column="KnowPoint2", max_length=100, null=True)


    class Meta:
        managed=True
        db_table="assortQuestion"


class HistoryParper(models.Model):
    HNo=models.IntegerField(db_column="HNo",primary_key=True,null=False,help_text="历史记录ID")#历史记录ID
    Timu=models.CharField(db_column="Timu",max_length=300,null=True,help_text="题目")#题目
    Answer = models.CharField(db_column="Answer",max_length=9999,null=True,help_text="作答记录")#作答记录
    insertTime=models.CharField(db_column="insertTime",max_length=50,null=False,help_text="入库时间")


    class Meta:
        managed=True
        db_table="HistoryParper"